# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-mimeparse
pkgver=1.6.0
pkgrel=11
pkgdesc='Module of basic functions for parsing mime-type names and matching them against a list of media-ranges'
arch=('any')
url="https://github.com/dbtsai/python-mimeparse"
license=('MIT')
depends=('python')
makedepends=('python-setuptools' 'git')
source=("git+https://github.com/dbtsai/python-mimeparse#tag=$pkgver")
sha512sums=('SKIP')

build() {
  cd "$srcdir"/python-mimeparse
  python setup.py build
}

check() {
  cd "$srcdir"/python-mimeparse
  python mimeparse_test.py
}

package() {
  cd python-mimeparse
  python setup.py install -O1 --root "$pkgdir"
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
